Skip to content

Conversation

m-torhan
Copy link
Contributor

@m-torhan m-torhan commented Oct 9, 2025

When twister tests are executed using Renode and Robot framework and the Renode process fails, the python script also fails and no further tests are executed.

Error:

ERROR   - Robot test failure: _ for _
ERROR   - General exception: can only concatenate str (not "NoneType") to str
Traceback (most recent call last):
  File "/zephyr/scripts/pylib/twister/twisterlib/runner.py", line 2060, in pipeline_mgr
    return self.process_tasks(processing_queue, processing_ready, lock, results)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/zephyr/scripts/pylib/twister/twisterlib/runner.py", line 2043, in process_tasks
    pb.process(processing_queue, processing_ready, task, lock, results)
  File "/zephyr/scripts/pylib/twister/twisterlib/runner.py", line 1161, in process
    self.report_out(results)
  File "/zephyr/scripts/pylib/twister/twisterlib/runner.py", line 1553, in report_out
    status += " " + instance.reason
              ~~~~^~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str

ERROR   - Process 1541 failed, aborting execution

This PR fixes this behavior by simply adding failure reason when executed Renode process fails.

Output with the fix:

INFO    - 1/8 _  _              FAILED Exited with 1 (renode 3.159s <zephyr>)
ERROR   - see: /_/handler.log
... further tests are executed

Copy link

github-actions bot commented Oct 9, 2025

Hello @m-torhan, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Add failure reason with return code when Renode process fails

Signed-off-by: Maciej Torhan <[email protected]>
@zephyrbot zephyrbot added area: Twister Twister size: XS A PR changing only a single line of code labels Oct 9, 2025
@m-torhan m-torhan force-pushed the fix-twister-robot-harness branch from 6517935 to 1346b8f Compare October 9, 2025 09:29
@nashif nashif added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Oct 9, 2025
Copy link

sonarqubecloud bot commented Oct 9, 2025

@cfriedt cfriedt merged commit 12d21df into zephyrproject-rtos:main Oct 9, 2025
49 checks passed
Copy link

github-actions bot commented Oct 9, 2025

Hi @m-torhan!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Twister Twister size: XS A PR changing only a single line of code Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants